Remove Reseller Service Group API
POST /removeResellerServiceGroup
Description
This API endpoint allows an admin to remove a service group from a reseller by providing the reseller's ID and the service group's ID. This removal unlinks the reseller from the specific services within the service group.
Request Body
The request utilizes GraphQL to perform the removeResellerServiceGroup
mutation.
Mutation:
mutation removeResellerServiceGroup ($resellerId: Int, $serviceGroupId: Int) {
removeResellerServiceGroup (resellerId: $resellerId, serviceGroupId: $serviceGroupId) {
id
email
firstName
lastName
credit
level
phone
}
}
Variables:
{
"resellerId": 0,
"serviceGroupId": 0
}
- resellerId (Int): The unique identifier of the reseller from whom the service group is being removed.
- serviceGroupId (Int): The unique identifier of the service group to be removed from the reseller.
Response:
-
Success (200 OK):
- If the removal is successful, the response will return the reseller's details, confirming that the service group has been removed from the reseller.
{
"data": {
"removeResellerServiceGroup": {
"id": "<Reseller_ID>",
"email": "<Reseller_Email>",
"firstName": "<First_Name>",
"lastName": "<Last_Name>",
"credit": "<Credit_Amount>",
"level": "<Reseller_Level>",
"phone": "<Phone_Number>"
}
}
} -
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid reseller ID, service group ID, missing required fields, or server errors.
Note:
Ensure that both the resellerId
and serviceGroupId
correspond to existing entries within the system. This API should be used by admins with the necessary permissions to manage reseller accounts and service group assignments.